

import request from '@/utils/http/index';


import { RepoParams } from './model/repoModel';



/**
 * api地址
 */
enum Api {
  MyRepoList = '/repo/allList',
  RepoList = '/repo/list',
  RepoCreate = '/repo/create',
  RepoUpdate = '/repo/update',
  RepoDelete = '/repo/delete',
}


export const getMyRepoList = (data: RepoParams) => {
  return request.post({ url: Api.MyRepoList,data })
}

export const getRepoList = (data: RepoParams) => {
  return request.post({ url: Api.RepoList,data })
}

// 新增知识库
export const createRepo = (data: RepoParams) => {
  return request.post({ url: Api.RepoCreate, data })
}

// 修改知识库
export const updateRepo = (data: RepoParams) => {
  return request.post({ url: Api.RepoUpdate, data })
}

// 删除知识库
export const deleteRepo = (data: RepoParams) => {
  return request.post({ url: Api.RepoDelete, data })
}